package controller;

import model.Drug;
import model.DrugBatch;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import service.DrugBatchService;
import service.DrugService;
import util.Result;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/drugbatch")
public class DrugBatchController {

    @Resource
    private DrugBatchService service;

    @RequestMapping("/findAll.do")
    public Object findAll(Integer id){
        List<DrugBatch> list = service.findAll(id);
        return new Result<>("200","",list);
    }
}
